using System;
using System.Collections.Generic;
using System.Text;
using flickr.api.communication;

namespace flickr.api
{
    public class Urls : FlickrObject
    {
        public Urls() : base() {}
        public Urls(FlickrConnection connection) : base(connection){}
        
        public Group getGroup(string groupId)
        {
            FlickrRequest request = CreateRequest();
            request.AddParameter(FlickrParameterType.GroupId, groupId);

            return Send(request).Group;
        }
        
        public User getUserPhotos(string userId)
        {
            FlickrRequest request = CreateRequest();
            request.AddParameter(FlickrParameterType.UserId, userId);

            return Send(request).User;
        }

        public User getUserProfile(string userId)
        {
            FlickrRequest request = CreateRequest();
            request.AddParameter(FlickrParameterType.UserId, userId);

            return Send(request).User;
        }

        public Group lookupGroup(string url)
        {
            FlickrRequest request = CreateRequest();
            request.AddParameter(FlickrParameterType.URL, url);

            return Send(request).Group;
        }
        
        public User lookupUser(string url)
        {
            FlickrRequest request = CreateRequest();
            request.AddParameter(FlickrParameterType.URL, url);

            return Send(request).User;
        }
    }
}
